﻿using System;
using System.ComponentModel;
using System.IO;
using System.Runtime.Serialization;

namespace HalconDotNet
{
	/// <summary>Represents an instance of a training data management class.</summary>
	// Token: 0x02000026 RID: 38
	[Serializable]
	public class HClassTrainData : HHandle, ISerializable, ICloneable
	{
		// Token: 0x06000339 RID: 825 RVA: 0x0000883B File Offset: 0x00006A3B
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HClassTrainData() : base(HHandleBase.UNDEF)
		{
		}

		// Token: 0x0600033A RID: 826 RVA: 0x00013331 File Offset: 0x00011531
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HClassTrainData(IntPtr handle) : base(handle)
		{
			this.AssertSemType();
		}

		// Token: 0x0600033B RID: 827 RVA: 0x00013340 File Offset: 0x00011540
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HClassTrainData(HHandle handle) : base(handle)
		{
			this.AssertSemType();
		}

		// Token: 0x0600033C RID: 828 RVA: 0x0001334F File Offset: 0x0001154F
		private void AssertSemType()
		{
			base.AssertSemType("class_train_data");
		}

		// Token: 0x0600033D RID: 829 RVA: 0x0001335C File Offset: 0x0001155C
		internal static int LoadNew(IntPtr proc, int parIndex, int err, out HClassTrainData obj)
		{
			obj = new HClassTrainData(HHandleBase.UNDEF);
			return obj.Load(proc, parIndex, err);
		}

		// Token: 0x0600033E RID: 830 RVA: 0x00013374 File Offset: 0x00011574
		internal static int LoadNew(IntPtr proc, int parIndex, int err, out HClassTrainData[] obj)
		{
			HTuple htuple;
			err = HTuple.LoadNew(proc, parIndex, err, out htuple);
			obj = new HClassTrainData[htuple.Length];
			for (int i = 0; i < htuple.Length; i++)
			{
				obj[i] = new HClassTrainData(HalconAPI.IsLegacyHandleMode() ? htuple[i].IP : htuple[i].H);
			}
			htuple.Dispose();
			return err;
		}

		/// <summary>
		///   Read the training data for classifiers from a file.
		///   Modified instance represents: Handle of the training data.
		/// </summary>
		/// <param name="fileName">File name of the training data.</param>
		// Token: 0x0600033F RID: 831 RVA: 0x000133E4 File Offset: 0x000115E4
		public HClassTrainData(string fileName)
		{
			IntPtr proc = HalconAPI.PreCall(1781);
			HalconAPI.StoreS(proc, 0, fileName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create a handle for training data for classifiers.
		///   Modified instance represents: Handle of the training data.
		/// </summary>
		/// <param name="numDim">Number of dimensions of the feature vector. Default: 10</param>
		// Token: 0x06000340 RID: 832 RVA: 0x00013430 File Offset: 0x00011630
		public HClassTrainData(int numDim)
		{
			IntPtr proc = HalconAPI.PreCall(1798);
			HalconAPI.StoreI(proc, 0, numDim);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		// Token: 0x06000341 RID: 833 RVA: 0x0001347C File Offset: 0x0001167C
		void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
		{
			HSerializedItem hserializedItem = this.SerializeClassTrainData();
			byte[] value = hserializedItem;
			hserializedItem.Dispose();
			info.AddValue("data", value, typeof(byte[]));
		}

		// Token: 0x06000342 RID: 834 RVA: 0x000134B4 File Offset: 0x000116B4
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HClassTrainData(SerializationInfo info, StreamingContext context)
		{
			HSerializedItem hserializedItem = new HSerializedItem((byte[])info.GetValue("data", typeof(byte[])));
			this.DeserializeClassTrainData(hserializedItem);
			hserializedItem.Dispose();
		}

		/// <summary>Serialize object to binary stream in HALCON format</summary>
		// Token: 0x06000343 RID: 835 RVA: 0x000134F4 File Offset: 0x000116F4
		public new void Serialize(Stream stream)
		{
			HSerializedItem hserializedItem = this.SerializeClassTrainData();
			hserializedItem.Serialize(stream);
			hserializedItem.Dispose();
		}

		/// <summary>Deserialize object from binary stream in HALCON format</summary>
		// Token: 0x06000344 RID: 836 RVA: 0x00013508 File Offset: 0x00011708
		public new static HClassTrainData Deserialize(Stream stream)
		{
			HClassTrainData hclassTrainData = new HClassTrainData();
			HSerializedItem hserializedItem = HSerializedItem.Deserialize(stream);
			hclassTrainData.DeserializeClassTrainData(hserializedItem);
			hserializedItem.Dispose();
			return hclassTrainData;
		}

		// Token: 0x06000345 RID: 837 RVA: 0x0001352E File Offset: 0x0001172E
		object ICloneable.Clone()
		{
			return this.Clone();
		}

		// Token: 0x06000346 RID: 838 RVA: 0x00013538 File Offset: 0x00011738
		public new HClassTrainData Clone()
		{
			HSerializedItem hserializedItem = this.SerializeClassTrainData();
			HClassTrainData hclassTrainData = new HClassTrainData();
			hclassTrainData.DeserializeClassTrainData(hserializedItem);
			hserializedItem.Dispose();
			return hclassTrainData;
		}

		/// <summary>
		///   Deserialize serialized training data for classifiers.
		///   Modified instance represents: Handle of the training data.
		/// </summary>
		/// <param name="serializedItemHandle">Handle of the serialized item.</param>
		// Token: 0x06000347 RID: 839 RVA: 0x00013560 File Offset: 0x00011760
		public void DeserializeClassTrainData(HSerializedItem serializedItemHandle)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1779);
			HalconAPI.Store(proc, 0, serializedItemHandle);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(serializedItemHandle);
		}

		/// <summary>
		///   Serialize training data for classifiers.
		///   Instance represents: Handle of the training data.
		/// </summary>
		/// <returns>Handle of the serialized item.</returns>
		// Token: 0x06000348 RID: 840 RVA: 0x000135B4 File Offset: 0x000117B4
		public HSerializedItem SerializeClassTrainData()
		{
			IntPtr proc = HalconAPI.PreCall(1780);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HSerializedItem result;
			num = HSerializedItem.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Read the training data for classifiers from a file.
		///   Modified instance represents: Handle of the training data.
		/// </summary>
		/// <param name="fileName">File name of the training data.</param>
		// Token: 0x06000349 RID: 841 RVA: 0x000135FC File Offset: 0x000117FC
		public void ReadClassTrainData(string fileName)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1781);
			HalconAPI.StoreS(proc, 0, fileName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Save the training data for classifiers in a file.
		///   Instance represents: Handle of the training data.
		/// </summary>
		/// <param name="fileName">Name of the file in which the training data will be written.</param>
		// Token: 0x0600034A RID: 842 RVA: 0x00013648 File Offset: 0x00011848
		public void WriteClassTrainData(string fileName)
		{
			IntPtr proc = HalconAPI.PreCall(1782);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, fileName);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Select certain features from training data to create  training data containing less features.
		///   Instance represents: Handle of the training data.
		/// </summary>
		/// <param name="subFeatureIndices">Indices or names to select the subfeatures or columns.</param>
		/// <returns>Handle of the reduced training data.</returns>
		// Token: 0x0600034B RID: 843 RVA: 0x00013684 File Offset: 0x00011884
		public HClassTrainData SelectSubFeatureClassTrainData(HTuple subFeatureIndices)
		{
			IntPtr proc = HalconAPI.PreCall(1783);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, subFeatureIndices);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(subFeatureIndices);
			HClassTrainData result;
			num = HClassTrainData.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Define subfeatures in training data.
		///   Instance represents: Handle of the training data that should be  partitioned into subfeatures.
		/// </summary>
		/// <param name="subFeatureLength">Length of the subfeatures.</param>
		/// <param name="names">Names of the subfeatures.</param>
		// Token: 0x0600034C RID: 844 RVA: 0x000136DC File Offset: 0x000118DC
		public void SetFeatureLengthsClassTrainData(HTuple subFeatureLength, HTuple names)
		{
			IntPtr proc = HalconAPI.PreCall(1784);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, subFeatureLength);
			HalconAPI.Store(proc, 2, names);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(subFeatureLength);
			HalconAPI.UnpinTuple(names);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Get the training data of a Gaussian Mixture Model (GMM).
		///   Modified instance represents: Handle of the training data of the classifier.
		/// </summary>
		/// <param name="GMMHandle">Handle of a GMM that contains training data.</param>
		// Token: 0x0600034D RID: 845 RVA: 0x0001372C File Offset: 0x0001192C
		public void GetClassTrainDataGmm(HClassGmm GMMHandle)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1785);
			HalconAPI.Store(proc, 0, GMMHandle);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(GMMHandle);
		}

		/// <summary>
		///   Add training data to a Gaussian Mixture Model (GMM).
		///   Instance represents: Handle of training data for a classifier.
		/// </summary>
		/// <param name="GMMHandle">Handle of a GMM which receives the training data.</param>
		// Token: 0x0600034E RID: 846 RVA: 0x00013780 File Offset: 0x00011980
		public void AddClassTrainDataGmm(HClassGmm GMMHandle)
		{
			IntPtr proc = HalconAPI.PreCall(1786);
			base.Store(proc, 1);
			HalconAPI.Store(proc, 0, GMMHandle);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
			GC.KeepAlive(GMMHandle);
		}

		/// <summary>
		///   Get the training data of a multilayer perceptron (MLP).
		///   Modified instance represents: Handle of the training data of the classifier.
		/// </summary>
		/// <param name="MLPHandle">Handle of a MLP that contains training data.</param>
		// Token: 0x0600034F RID: 847 RVA: 0x000137C4 File Offset: 0x000119C4
		public void GetClassTrainDataMlp(HClassMlp MLPHandle)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1787);
			HalconAPI.Store(proc, 0, MLPHandle);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(MLPHandle);
		}

		/// <summary>
		///   Add training data to a multilayer perceptron (MLP).
		///   Instance represents: Training data for a classifier.
		/// </summary>
		/// <param name="MLPHandle">MLP handle which receives the training data.</param>
		// Token: 0x06000350 RID: 848 RVA: 0x00013818 File Offset: 0x00011A18
		public void AddClassTrainDataMlp(HClassMlp MLPHandle)
		{
			IntPtr proc = HalconAPI.PreCall(1788);
			base.Store(proc, 1);
			HalconAPI.Store(proc, 0, MLPHandle);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
			GC.KeepAlive(MLPHandle);
		}

		/// <summary>
		///   Get the training data of a k-nearest neighbors (k-NN) classifier.
		///   Modified instance represents: Handle of the training data of the classifier.
		/// </summary>
		/// <param name="KNNHandle">Handle of the k-NN classifier  that contains training data.</param>
		// Token: 0x06000351 RID: 849 RVA: 0x0001385C File Offset: 0x00011A5C
		public void GetClassTrainDataKnn(HClassKnn KNNHandle)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1789);
			HalconAPI.Store(proc, 0, KNNHandle);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(KNNHandle);
		}

		/// <summary>
		///   Add training data to a k-nearest neighbors (k-NN) classifier.
		///   Instance represents: Training data for a classifier.
		/// </summary>
		/// <param name="KNNHandle">Handle of a k-NN which receives the  training data.</param>
		// Token: 0x06000352 RID: 850 RVA: 0x000138B0 File Offset: 0x00011AB0
		public void AddClassTrainDataKnn(HClassKnn KNNHandle)
		{
			IntPtr proc = HalconAPI.PreCall(1790);
			base.Store(proc, 1);
			HalconAPI.Store(proc, 0, KNNHandle);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
			GC.KeepAlive(KNNHandle);
		}

		/// <summary>
		///   Get the training data of a support vector machine (SVM).
		///   Modified instance represents: Handle of the training data of the classifier.
		/// </summary>
		/// <param name="SVMHandle">Handle of a SVM that contains training data.</param>
		// Token: 0x06000353 RID: 851 RVA: 0x000138F4 File Offset: 0x00011AF4
		public void GetClassTrainDataSvm(HClassSvm SVMHandle)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1791);
			HalconAPI.Store(proc, 0, SVMHandle);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(SVMHandle);
		}

		/// <summary>
		///   Add training data to a support vector machine (SVM).
		///   Instance represents: Training data for a classifier.
		/// </summary>
		/// <param name="SVMHandle">Handle of a SVM which receives the training data.</param>
		// Token: 0x06000354 RID: 852 RVA: 0x00013948 File Offset: 0x00011B48
		public void AddClassTrainDataSvm(HClassSvm SVMHandle)
		{
			IntPtr proc = HalconAPI.PreCall(1792);
			base.Store(proc, 1);
			HalconAPI.Store(proc, 0, SVMHandle);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
			GC.KeepAlive(SVMHandle);
		}

		/// <summary>
		///   Return the number of training samples stored in the training data.
		///   Instance represents: Handle of training data.
		/// </summary>
		/// <returns>Number of stored training samples.</returns>
		// Token: 0x06000355 RID: 853 RVA: 0x0001398C File Offset: 0x00011B8C
		public int GetSampleNumClassTrainData()
		{
			IntPtr proc = HalconAPI.PreCall(1793);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			int result;
			num = HalconAPI.LoadI(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Return a training sample from training data.
		///   Instance represents: Handle of training data for a classifier.
		/// </summary>
		/// <param name="indexSample">Number of stored training sample.</param>
		/// <param name="classID">Class of the training sample.</param>
		/// <returns>Feature vector of the training sample.</returns>
		// Token: 0x06000356 RID: 854 RVA: 0x000139D4 File Offset: 0x00011BD4
		public HTuple GetSampleClassTrainData(int indexSample, out int classID)
		{
			IntPtr proc = HalconAPI.PreCall(1794);
			base.Store(proc, 0);
			HalconAPI.StoreI(proc, 1, indexSample);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, HTupleType.DOUBLE, num, out result);
			num = HalconAPI.LoadI(proc, 1, num, out classID);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Clears training data for classifiers.
		///   Instance represents: Handle of training data for a classifier.
		/// </summary>
		// Token: 0x06000357 RID: 855 RVA: 0x00013A38 File Offset: 0x00011C38
		public void ClearClassTrainData()
		{
			IntPtr proc = HalconAPI.PreCall(1796);
			base.Store(proc, 0);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Add a training sample to training data.
		///   Instance represents: Handle of the training data.
		/// </summary>
		/// <param name="order">The order of the feature vector. Default: "row"</param>
		/// <param name="features">Feature vector of the training sample.</param>
		/// <param name="classID">Class of the training sample.</param>
		// Token: 0x06000358 RID: 856 RVA: 0x00013A6C File Offset: 0x00011C6C
		public void AddSampleClassTrainData(string order, HTuple features, HTuple classID)
		{
			IntPtr proc = HalconAPI.PreCall(1797);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, order);
			HalconAPI.Store(proc, 2, features);
			HalconAPI.Store(proc, 3, classID);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(features);
			HalconAPI.UnpinTuple(classID);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create a handle for training data for classifiers.
		///   Modified instance represents: Handle of the training data.
		/// </summary>
		/// <param name="numDim">Number of dimensions of the feature vector. Default: 10</param>
		// Token: 0x06000359 RID: 857 RVA: 0x00013AC4 File Offset: 0x00011CC4
		public void CreateClassTrainData(int numDim)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1798);
			HalconAPI.StoreI(proc, 0, numDim);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Selects an optimal combination of features to classify the provided data.
		///   Instance represents: Handle of the training data.
		/// </summary>
		/// <param name="selectionMethod">Method to perform the selection. Default: "greedy"</param>
		/// <param name="genParamName">Names of generic parameters to configure the  selection process and the classifier. Default: []</param>
		/// <param name="genParamValue">Values of generic parameters to configure the  selection process and the classifier. Default: []</param>
		/// <param name="selectedFeatureIndices">The selected feature set, contains  indices referring.</param>
		/// <param name="score">The achieved score using two-fold cross-validation.</param>
		/// <returns>A trained MLP classifier using only the selected  features.</returns>
		// Token: 0x0600035A RID: 858 RVA: 0x00013B10 File Offset: 0x00011D10
		public HClassMlp SelectFeatureSetMlp(string selectionMethod, HTuple genParamName, HTuple genParamValue, out HTuple selectedFeatureIndices, out HTuple score)
		{
			IntPtr proc = HalconAPI.PreCall(1799);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, selectionMethod);
			HalconAPI.Store(proc, 2, genParamName);
			HalconAPI.Store(proc, 3, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			HClassMlp result;
			num = HClassMlp.LoadNew(proc, 0, num, out result);
			num = HTuple.LoadNew(proc, 1, num, out selectedFeatureIndices);
			num = HTuple.LoadNew(proc, 2, HTupleType.DOUBLE, num, out score);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Selects an optimal combination of features to classify the provided data.
		///   Instance represents: Handle of the training data.
		/// </summary>
		/// <param name="selectionMethod">Method to perform the selection. Default: "greedy"</param>
		/// <param name="genParamName">Names of generic parameters to configure the  selection process and the classifier. Default: []</param>
		/// <param name="genParamValue">Values of generic parameters to configure the  selection process and the classifier. Default: []</param>
		/// <param name="selectedFeatureIndices">The selected feature set, contains  indices referring.</param>
		/// <param name="score">The achieved score using two-fold cross-validation.</param>
		/// <returns>A trained MLP classifier using only the selected  features.</returns>
		// Token: 0x0600035B RID: 859 RVA: 0x00013BA4 File Offset: 0x00011DA4
		public HClassMlp SelectFeatureSetMlp(string selectionMethod, string genParamName, double genParamValue, out HTuple selectedFeatureIndices, out HTuple score)
		{
			IntPtr proc = HalconAPI.PreCall(1799);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, selectionMethod);
			HalconAPI.StoreS(proc, 2, genParamName);
			HalconAPI.StoreD(proc, 3, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			int num = HalconAPI.CallProcedure(proc);
			HClassMlp result;
			num = HClassMlp.LoadNew(proc, 0, num, out result);
			num = HTuple.LoadNew(proc, 1, num, out selectedFeatureIndices);
			num = HTuple.LoadNew(proc, 2, HTupleType.DOUBLE, num, out score);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Selects an optimal combination of features to classify the provided data.
		///   Instance represents: Handle of the training data.
		/// </summary>
		/// <param name="selectionMethod">Method to perform the selection. Default: "greedy"</param>
		/// <param name="genParamName">Names of generic parameters to configure the  selection process and the classifier. Default: []</param>
		/// <param name="genParamValue">Values of generic parameters to configure the  selection process and the classifier. Default: []</param>
		/// <param name="selectedFeatureIndices">The selected feature set, contains  indices.</param>
		/// <param name="score">The achieved score using two-fold cross-validation.</param>
		/// <returns>A trained SVM classifier using only the selected  features.</returns>
		// Token: 0x0600035C RID: 860 RVA: 0x00013C2C File Offset: 0x00011E2C
		public HClassSvm SelectFeatureSetSvm(string selectionMethod, HTuple genParamName, HTuple genParamValue, out HTuple selectedFeatureIndices, out HTuple score)
		{
			IntPtr proc = HalconAPI.PreCall(1800);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, selectionMethod);
			HalconAPI.Store(proc, 2, genParamName);
			HalconAPI.Store(proc, 3, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			HClassSvm result;
			num = HClassSvm.LoadNew(proc, 0, num, out result);
			num = HTuple.LoadNew(proc, 1, num, out selectedFeatureIndices);
			num = HTuple.LoadNew(proc, 2, HTupleType.DOUBLE, num, out score);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Selects an optimal combination of features to classify the provided data.
		///   Instance represents: Handle of the training data.
		/// </summary>
		/// <param name="selectionMethod">Method to perform the selection. Default: "greedy"</param>
		/// <param name="genParamName">Names of generic parameters to configure the  selection process and the classifier. Default: []</param>
		/// <param name="genParamValue">Values of generic parameters to configure the  selection process and the classifier. Default: []</param>
		/// <param name="selectedFeatureIndices">The selected feature set, contains  indices.</param>
		/// <param name="score">The achieved score using two-fold cross-validation.</param>
		/// <returns>A trained SVM classifier using only the selected  features.</returns>
		// Token: 0x0600035D RID: 861 RVA: 0x00013CC0 File Offset: 0x00011EC0
		public HClassSvm SelectFeatureSetSvm(string selectionMethod, string genParamName, double genParamValue, out HTuple selectedFeatureIndices, out HTuple score)
		{
			IntPtr proc = HalconAPI.PreCall(1800);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, selectionMethod);
			HalconAPI.StoreS(proc, 2, genParamName);
			HalconAPI.StoreD(proc, 3, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			int num = HalconAPI.CallProcedure(proc);
			HClassSvm result;
			num = HClassSvm.LoadNew(proc, 0, num, out result);
			num = HTuple.LoadNew(proc, 1, num, out selectedFeatureIndices);
			num = HTuple.LoadNew(proc, 2, HTupleType.DOUBLE, num, out score);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Selects an optimal combination from a set of features to classify the  provided data.
		///   Instance represents: Handle of the training data.
		/// </summary>
		/// <param name="selectionMethod">Method to perform the selection. Default: "greedy"</param>
		/// <param name="genParamName">Names of generic parameters to configure  the classifier. Default: []</param>
		/// <param name="genParamValue">Values of generic parameters to configure  the classifier. Default: []</param>
		/// <param name="selectedFeatureIndices">The selected feature set, contains indices or names.</param>
		/// <param name="score">The achieved score using two-fold cross-validation.</param>
		/// <returns>A trained GMM classifier using only the selected  features.</returns>
		// Token: 0x0600035E RID: 862 RVA: 0x00013D48 File Offset: 0x00011F48
		public HClassGmm SelectFeatureSetGmm(string selectionMethod, HTuple genParamName, HTuple genParamValue, out HTuple selectedFeatureIndices, out HTuple score)
		{
			IntPtr proc = HalconAPI.PreCall(1801);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, selectionMethod);
			HalconAPI.Store(proc, 2, genParamName);
			HalconAPI.Store(proc, 3, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			HClassGmm result;
			num = HClassGmm.LoadNew(proc, 0, num, out result);
			num = HTuple.LoadNew(proc, 1, num, out selectedFeatureIndices);
			num = HTuple.LoadNew(proc, 2, HTupleType.DOUBLE, num, out score);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Selects an optimal combination from a set of features to classify the  provided data.
		///   Instance represents: Handle of the training data.
		/// </summary>
		/// <param name="selectionMethod">Method to perform the selection. Default: "greedy"</param>
		/// <param name="genParamName">Names of generic parameters to configure  the classifier. Default: []</param>
		/// <param name="genParamValue">Values of generic parameters to configure  the classifier. Default: []</param>
		/// <param name="selectedFeatureIndices">The selected feature set, contains indices or names.</param>
		/// <param name="score">The achieved score using two-fold cross-validation.</param>
		/// <returns>A trained GMM classifier using only the selected  features.</returns>
		// Token: 0x0600035F RID: 863 RVA: 0x00013DDC File Offset: 0x00011FDC
		public HClassGmm SelectFeatureSetGmm(string selectionMethod, string genParamName, double genParamValue, out HTuple selectedFeatureIndices, out HTuple score)
		{
			IntPtr proc = HalconAPI.PreCall(1801);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, selectionMethod);
			HalconAPI.StoreS(proc, 2, genParamName);
			HalconAPI.StoreD(proc, 3, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			int num = HalconAPI.CallProcedure(proc);
			HClassGmm result;
			num = HClassGmm.LoadNew(proc, 0, num, out result);
			num = HTuple.LoadNew(proc, 1, num, out selectedFeatureIndices);
			num = HTuple.LoadNew(proc, 2, HTupleType.DOUBLE, num, out score);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Selects an optimal subset from a set of features to solve a certain  classification problem.
		///   Instance represents: Handle of the training data.
		/// </summary>
		/// <param name="selectionMethod">Method to perform the selection. Default: "greedy"</param>
		/// <param name="genParamName">Names of generic parameters to configure the selection process and the classifier. Default: []</param>
		/// <param name="genParamValue">Values of generic parameters to configure the  selection process and the classifier. Default: []</param>
		/// <param name="selectedFeatureIndices">The selected feature set, contains  indices or names.</param>
		/// <param name="score">The achieved score using two-fold cross-validation.</param>
		/// <returns>A trained k-NN classifier using only the selected  features.</returns>
		// Token: 0x06000360 RID: 864 RVA: 0x00013E64 File Offset: 0x00012064
		public HClassKnn SelectFeatureSetKnn(string selectionMethod, HTuple genParamName, HTuple genParamValue, out HTuple selectedFeatureIndices, out HTuple score)
		{
			IntPtr proc = HalconAPI.PreCall(1802);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, selectionMethod);
			HalconAPI.Store(proc, 2, genParamName);
			HalconAPI.Store(proc, 3, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			HClassKnn result;
			num = HClassKnn.LoadNew(proc, 0, num, out result);
			num = HTuple.LoadNew(proc, 1, num, out selectedFeatureIndices);
			num = HTuple.LoadNew(proc, 2, HTupleType.DOUBLE, num, out score);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Selects an optimal subset from a set of features to solve a certain  classification problem.
		///   Instance represents: Handle of the training data.
		/// </summary>
		/// <param name="selectionMethod">Method to perform the selection. Default: "greedy"</param>
		/// <param name="genParamName">Names of generic parameters to configure the selection process and the classifier. Default: []</param>
		/// <param name="genParamValue">Values of generic parameters to configure the  selection process and the classifier. Default: []</param>
		/// <param name="selectedFeatureIndices">The selected feature set, contains  indices or names.</param>
		/// <param name="score">The achieved score using two-fold cross-validation.</param>
		/// <returns>A trained k-NN classifier using only the selected  features.</returns>
		// Token: 0x06000361 RID: 865 RVA: 0x00013EF8 File Offset: 0x000120F8
		public HClassKnn SelectFeatureSetKnn(string selectionMethod, string genParamName, double genParamValue, out HTuple selectedFeatureIndices, out HTuple score)
		{
			IntPtr proc = HalconAPI.PreCall(1802);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, selectionMethod);
			HalconAPI.StoreS(proc, 2, genParamName);
			HalconAPI.StoreD(proc, 3, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			int num = HalconAPI.CallProcedure(proc);
			HClassKnn result;
			num = HClassKnn.LoadNew(proc, 0, num, out result);
			num = HTuple.LoadNew(proc, 1, num, out selectedFeatureIndices);
			num = HTuple.LoadNew(proc, 2, HTupleType.DOUBLE, num, out score);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}
	}
}
